-
Notifications
You must be signed in to change notification settings - Fork 356
feat: update to latest json schema test suite #821
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
45e4b9e
to
64ad0c7
Compare
970acdd
to
8875da9
Compare
ee860de
to
1e458b3
Compare
c9ae357
to
b67dc06
Compare
b67dc06
to
0ae67f3
Compare
b6db705
to
04a0263
Compare
ae4a833
to
5185c14
Compare
5185c14
to
5c92ede
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the JSON Schema Test Suite dependency and introduces new test cases for validating JSON schemas. Key changes include dependency upgrades in composer.json, the addition of new test classes (including JsonSchemaTestSuiteTest), and updates to existing test cases and helper methods to support the newer dependency version.
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
tests/JsonSchemaTestSuiteTest.php | New test suite to load and run JSON Schema test cases. |
tests/Drafts/Draft4Test.php & tests/Drafts/Draft3Test.php | Updated draft-based test generators with additional skipped tests. |
tests/Constraints/VeryBaseTestCase.php | Added a helper to detect 32-bit environments. |
tests/Constraints/NumberAndIntegerTypesTest.php | Updated test cases with keyed input for clarity. |
tests/Constraints/BaseTestCase.php | Improved type hints and added custom error messages for validator errors. |
phpunit.xml.dist | Increased memory limit configuration for tests. |
composer.json | Upgraded JSON Schema Test Suite dependency to version 23.2.0. |
Comments suppressed due to low confidence (1)
tests/JsonSchemaTestSuiteTest.php:41
- [nitpick] The error message 'Optional test case would during validate() invocation' is ambiguous; consider revising it to clearly indicate that the test case is being skipped due to an exception during validation.
$this->markTestSkipped('Optional test case would during validate() invocation');
This pull request updates the
json-schema/json-schema-test-suite
dependency to a newer version and introduces a new test suite for validating JSON schemas. The goal here is to have a quicker turnaround then just the bowtie reports. The most important changes are grouped below:Dependency Updates:
json-schema/json-schema-test-suite
dependency incomposer.json
from version1.2.0
to^23.2
and updated the package version and reference in therepositories
section to match the new version. [1] [2]New Test Suite:
JsonSchemaTestSuite
class intests/JsonSchemaTestSuite.php
to run validation tests using thejson-schema/json-schema-test-suite
. This includes:testIt
method to validate test cases and assert results.casesDataProvider
method to dynamically load test cases from thejson-schema-test-suite
repository, skipping certain drafts.loadRemotesIntoStorage
helper method to load remote schemas into the schema storage.